<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">



<html>

<head>

    <title>收银台</title>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!--标准mui.css-->

    <link rel="stylesheet" href="__PUBLIC__/Css/css/mui.min.css">

    <script src="//libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>

    <style>body{background-color: #FFF;}

    body {

        padding-bottom: 65px;

    }

    #pngpng {

        width: auto;

        height: auto;

        max-width: 30%;

        max-height: 30%;

        padding-bottom: 40px;

    }

    .shouyi {

        height: 45px;

        line-height: 45px;

        width: 100%;

        text-align: center;

        font-size: 16px;

        border: 1px solid #ccc;

        margin-bottom: 50px;

    }

    .zhifu {

        text-align: center;

        margin-top: 20px

    }

    .weui_msg {

        padding-top: 0!important;

    }

    .weui_btn {

        line-height:1.8!important;

        padding: 0!important;

        text-align: center!important;

        font-size: 15px!important;

    }

    #pngpng {

        padding-bottom:0!important;



    }



    .weui_msg_desc {

        line-height: 25px;

    }



    .dingdan {

        min-width: 100%;

    }

    .dingdan span {

        display: inline-block;

        font-size: 16px;

        width: 8em;

        height: 2em;

        line-height: 2em;

        border: 1px solid #ccc;

        -webkit-border-radius: 5px;

        -moz-border-radius: 5px;

        border-radius: 5px;

        /*margin: 0 1em;*/

        color: #fff;

        background-color: #04be02;

    }

        ul {

            list-style: none;

        }

        .list li{

            height: 40px;

        }

    .list span {

        display: inline-block;

        width: 60px;

        text-align: center;

        height: 40px;

    }

    .mui-popup-title {

        font-size: 16px;

    }

    .list input {

        display: inline-block;

        width: 170px;

        height: 30px;

        border: 0;

        outline: none;

        background-color: transparent;

        padding-left: 6px;

        border: 1px solid #ccc;

        margin-left: 10px;

        font-size: 14px;

    }

    </style>

    <script src="/Public/js/mui.min.js"></script>

    <!--标准muiEND-->

    <link rel="stylesheet" href="__PUBLIC__/weui/style/weui.min.css"/>

    <script>



        // 轮询获取状态刷新页面

        $(function(){

            var setid=null

            function ajaxAll() {

                $.ajax({

                    url:'https://app.xiaoyichuxing.net/index.php?s=/Index/pay_status.html',

                    type:'post',

                    dataType:'json',

                    data:{

                        order_id:"{$order['id']}"

                    },

                    success:function(res){

                        clearInterval(setid)

                        if(res.code == 1) {

                            window.localStorage.setItem('key','1')



                            window.location.reload(true)

                        }else {

                            setid = setInterval(function(){

                                ajaxAll()

                            },1000)

                        }

                    }

                })

            }



            if (localStorage.getItem('key') == "1" ) {

                window.localStorage.removeItem('key')

            } else {

                ajaxAll()

            }





            // 申请退款

            $('.dingdan span').on('click',function(){

               var str = ' <ul class="list">\n' +

                   '        <li><span>姓名</span><input type="text" name="username"></li>\n' +

                   '        <li><span>手机号</span><input type="text" name="mobile"></li>\n' +

                   '        <li><span>银行卡号</span><input type="text" name="card"></li>\n' +

                   '    </ul>'

                mui.confirm(str,'请填写退款账号',["确认",'取消'],function(e){

                   if(e.index == 0) {

                       var username = $('.list [name="username"]').val()

                       var mobile = $('.list [name="mobile"]').val()

                       var card = $('.list [name="card"]').val()

                        if($.trim(username) == '' ) {

                            alert('请输入姓名')

                            return false

                        }

                       if($.trim(mobile) == '' ) {

                           alert('请输入手机号')

                           return false

                       }

                       if($.trim(card) == '' ) {

                           alert('请输入银行卡号')

                           return false

                       }



                       $.ajax({

                           url:'https://app.xiaoyichuxing.net/index.php?s=/Index/cexiao.html',

                           type:'post',

                           dataType:'json',

                           data:{

                               order_id:"{$order['id']}",

                               name:username,

                               mobile:mobile,

                               card:card

                           },

                           success:function(res){

                               if(res.code == 1) {

                                   alert(res.msg)

                                   window.location.reload()

                               }else {

                                   alert(res.msg)

                               }

                           }

                       })

                   }

                },'div')

            })

        })

    </script>

</head>

<body>

<div class="weui_msg">





    <div class="shouyi">

        收银台

    </div>

    <!--<div class="weui_icon_area" ><i class="weui_icon_success weui_icon_msg"></i>-->



    <!--</div>-->

    <if condition="$order['status'] eq '0'">

        <img id="pngpng" src ="{$paypng}"   alt="">

    </if>

    <if condition="$order['status'] eq '6'">

        <div class="weui_icon_area">

            <i class="weui_icon_success weui_icon_msg"></i>

        </div>

    </if>

    <div class="weui_text_area">

        <h2 class="weui_msg_title">支付状态</h2>

        <a style="width: 30%" class="weui_btn weui_btn_primary" href="javascript:;">

            <if condition="($order['pay_statu'] eq '1') && ($order['status'] neq '7')">已支付

                <else/>

                <if condition="$order['status'] eq '6'">已支付

                    <elseif condition="$order['status'] eq '7'"/>已经撤销

                    <elseif condition="$order['status'] eq '5'"/>确认订单

                    <elseif condition="$order['status'] eq '4'"/>已到达目的地

                    <elseif condition="$order['status'] eq '3'"/>接到乘客

                    <elseif condition="$order['status'] eq '2'"/>到达指定地点

                    <elseif condition="$order['status'] eq '1'"/>发车

                    <elseif condition="$order['status'] eq '0'"/>未支付

                </if>

            </if> 

        </a>



        <p class="zhifu">

            <if condition="$order['status'] eq '0'">

                长按二维码识别进行支付

            </if>

        </p>





        <div class="weui_cells_title">订单信息</div>

        <div class="weui_cells">

            <div class="weui_cell">

                <div>

                    <p class="weui_msg_desc" style="text-align: left">商户名称：小易出行<br />支付金额：<font color='#76EE00'>￥{$order['price']}</font><br />下单时间：{$order['addtime']|date='Y-m-d H:i:s',###}<br />订单编号：{$order['orderid']}</p>

                </div>

            </div>

        </div>

    </div>



    <if condition="($order['pay_statu'] eq '1') && ($order['status'] neq '7') && ($order['status'] neq '6')">

        <div class="dingdan">

            <span >订单撤销</span>

        </div>





    </if>





    <div class="weui_opr_area">

        <p class="weui_btn_area">

            <if condition="$order['status'] eq '6' and $order['isevaluate'] eq '0'">

                <a href="{:U('Evaluate/createEvaluate',array('orderid'=>$order['orderid']))}" class="weui_btn weui_btn_primary">

                    去评价

                </a>

                <elseif condition="$order['status'] eq '6' and $order['isevaluate'] eq '1'"/> <a href="#" class="weui_btn weui_btn_primary">

                已评价

            </a>

            </if>

            <if condition="$order['status'] eq '6' and $order['iscomplaint'] eq '0'">

                <a href="{:U('Complaint/createComplaint',array('orderid'=>$order['orderid']))}" class="weui_btn weui_btn_primary">

                    投诉

                </a>

                <elseif condition="$order['status'] eq '6' and $order['iscomplaint'] eq '1'"/> <a href="#" class="weui_btn weui_btn_primary">

                已投诉

            </a>

            </if>



        <p><present name="evaluate.servicescore">服务评分：{$evaluate['servicescore']}分</present></p>

        <p><present name="evaluate.driverscore">司机评分：{$evaluate['driverscore']}分</present></p>

        <p><present name="evaluate.vehiclescore">车辆评分：{$evaluate['vehiclescore']}分</present></p>

        </p>

    </div>

    <!--<div class="weui_text_area">-->

    <!--<p class="weui_msg_desc">如需退款请联系客服</p>-->

    <!--</div>-->

    <div class="weui_extra_area">

        <a href="">查看详情</a>

    </div>

</div>

<include file="footer" />

</body>

</html>



